angular.module("home",[])
.config(["$stateProvider",function($stateProvider){
	$stateProvider.state("/home",{
		url:"/home",
		css:"html/home/home.css",
		templateUrl:"html/home/home.html",
		controller:"homeController"
	})
}]).controller("homeController",function($rootScope,$scope,$http){
	$rootScope.navigate = true;
	
	var mySwiper = new Swiper('.swiper-container', {
	autoplay: 5000,//可选选项，自动滑动
	effect : 'fade',
	pagination : '.swiper-pagination',
	prevButton:'.swiper-button-prev',
	nextButton:'.swiper-button-next',
	loop : true,//环路
	})

	$http({
		url:'lib/node/fruit.json',
		method:'GET',
	}).then(function(data){
		$scope.arr = data.data.data.splice(0,3);
		$scope.str = data.data.data.splice(0,3);
		$scope.str1 = data.data.data.splice(0,3);
		$scope.str2 = data.data.data.splice(0,3);
		$scope.str3 = data.data.data.splice(0,3);
	})
})
